#ifndef DATA_POLYGON_H
#define DATA_POLYGON_H

#include "Common/Algebra/Vec2.h"
#include "Common/Algebra/Transform.h"
#include "Common/Geometry/Polygon.h"

namespace data {

	class PolygonShape
	{
	public:
		PolygonShape( const cmn::Transform& position, const cmn::Polygon& polygon ) :
			m_position( position ),
			m_polygon( polygon )
		{}

		PolygonShape( const PolygonShape& polygon ) :
			m_position( polygon.m_position ),
			m_polygon( polygon.m_polygon )
		{}

		~PolygonShape() {}

		inline cmn::Transform GetPosition() const { return m_position; }
		inline void SetPosition( const cmn::Transform& position ) { m_position = position; }

		inline cmn::Polygon GetPolygon() const { return m_polygon; }
		inline void SetPolygon( const cmn::Polygon& polygon ) { m_polygon = polygon; }

	private:
		cmn::Transform m_position;
		cmn::Polygon m_polygon;
	};

	inline bool operator == ( const PolygonShape& a, const PolygonShape& b ) {
		return
			a.GetPolygon() == b.GetPolygon() &&
			a.GetPosition() == b.GetPosition();
	}

	inline bool operator != ( const PolygonShape& a, const PolygonShape& b ) {
		return !( a == b );
	}
}

#endif
